﻿<?php
    @session_start();
    ob_start();
    $_SESSION['adminUid']="";
    $_SESSION['admin']=false;
    $rootdir = rtrim($_SERVER['DOCUMENT_ROOT'],"/");
    include_once("../initial.php");
		$DOCUMENT_ROOT=$_SERVER["DOCUMENT_ROOT"];

    if ($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]) 
    { 
     $ip = $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]; 
    } 
    elseif ($HTTP_SERVER_VARS["HTTP_CLIENT_IP"]) 
    { 
     $ip = $HTTP_SERVER_VARS["HTTP_CLIENT_IP"]; 
    }
    elseif ($HTTP_SERVER_VARS["REMOTE_ADDR"]) 
    { 
     $ip = $HTTP_SERVER_VARS["REMOTE_ADDR"]; 
    } 
    elseif (getenv("HTTP_X_FORWARDED_FOR")) 
    { 
     $ip = getenv("HTTP_X_FORWARDED_FOR"); 
    } 
    elseif (getenv("HTTP_CLIENT_IP")) 
    { 
     $ip = getenv("HTTP_CLIENT_IP"); 
    } 
    elseif (getenv("REMOTE_ADDR"))
    { 
     $ip = getenv("REMOTE_ADDR"); 
    } 
    else 
    { 
     $ip = "Unknown"; 
    } 

            $uid=$_SESSION['user'];
            $_SESSION["user"]="";
            $_SESSION['admin']=false;
            
            $tag  =$ip.$uid;
            $_SESSION['adminUid']="";
            $_SESSION['admin']=false;
            $url = constant('PROJECT_URL')."/user/index.php";
            echo "<script language='javascript'>";
            echo " location='".$url."';";
            echo "</script>";

?>
